package com.dt76.smallloanbackenduser.controller.ysy;

import com.dt76.smallloanbackenduser.remote.ysy.StreamRemote;
import com.dt76.smallloanbackenduser.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/ysy")
public class StreamController {
    //注入远程服务接口
    @Autowired
    private StreamRemote streamRemote;
    @RequestMapping("/stream")
    public String account2(Model model){
        model.addAttribute("qryAllList1",streamRemote.qryStreamAll());
        return "pages/ysy/stream";
    }
    @RequestMapping("/delstr/{yId}")
    @ResponseBody
    public Result delstr(@PathVariable String yId){
        return streamRemote.delstr(Integer.parseInt(yId));
    }
}